package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the kq_updaterecord database table.
 * 
 */
@Entity
@Table(name="kq_updaterecord")
@NamedQuery(name="KqUpdaterecord.findAll", query="SELECT k FROM KqUpdaterecord k")
public class KqUpdaterecord implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="UR_ID")
	private int urId;

	@Column(name="UR_CLASS")
	private String urClass;

	@Temporal(TemporalType.DATE)
	@Column(name="UR_DATE")
	private Date urDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="UR_TIME")
	private Date urTime;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff1;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="STA_staff_id")
	private Staff staff2;

	//bi-directional many-to-one association to KqUpdatetype
	@OneToMany(mappedBy="kqUpdaterecord")
	private List<KqUpdatetype> kqUpdatetypes;

	public KqUpdaterecord() {
	}

	public int getUrId() {
		return this.urId;
	}

	public void setUrId(int urId) {
		this.urId = urId;
	}

	public String getUrClass() {
		return this.urClass;
	}

	public void setUrClass(String urClass) {
		this.urClass = urClass;
	}

	public Date getUrDate() {
		return this.urDate;
	}

	public void setUrDate(Date urDate) {
		this.urDate = urDate;
	}

	public Date getUrTime() {
		return this.urTime;
	}

	public void setUrTime(Date urTime) {
		this.urTime = urTime;
	}

	public Staff getStaff1() {
		return this.staff1;
	}

	public void setStaff1(Staff staff1) {
		this.staff1 = staff1;
	}

	public Staff getStaff2() {
		return this.staff2;
	}

	public void setStaff2(Staff staff2) {
		this.staff2 = staff2;
	}

	public List<KqUpdatetype> getKqUpdatetypes() {
		return this.kqUpdatetypes;
	}

	public void setKqUpdatetypes(List<KqUpdatetype> kqUpdatetypes) {
		this.kqUpdatetypes = kqUpdatetypes;
	}

	public KqUpdatetype addKqUpdatetype(KqUpdatetype kqUpdatetype) {
		getKqUpdatetypes().add(kqUpdatetype);
		kqUpdatetype.setKqUpdaterecord(this);

		return kqUpdatetype;
	}

	public KqUpdatetype removeKqUpdatetype(KqUpdatetype kqUpdatetype) {
		getKqUpdatetypes().remove(kqUpdatetype);
		kqUpdatetype.setKqUpdaterecord(null);

		return kqUpdatetype;
	}

}